<!doctype html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout" layout:decorate="~{theme/default/layout}">

<head></head>
<body>
<div layout:fragment="content">
    <!-- 图片 -->
    <div class="image-banner" style="color: #fff">
        <div class="image-content"><img th:src="@{${prefix} + '/source/images/postList.png'}" class="magic img-responsive" ></div>
        <div class="descr"><a th:href="@{/}">首页</a>  /  <a href="javascript:void(0)">分类</a></div>
        <div class="title">分类相关</div>
    </div>

    <div class="ml-content">
        <div class="ml-content-body">
            <div class="archive-body" id="archives">
                <div th:if="${pageInfo.total > 0}">
                    <div class='archive-content'th:each="post,iterStat : ${pageInfo.list}">
                        <div class="archives animate-box" data-animate-effect="fadeInUp">
                            <a th:href="@{'/'+${post.link}}"><span class="time">[[${post.year} + '-' + ${post.month} + '-' + ${post.day}]]</span>[[${post.title}]]</a>
                        </div>
                    </div>
                </div>
                <div class='archive-title' th:if="${pageInfo.total == 0}">
                    <div style="text-align:center;">
                        ~~找不到数据~~
                    </div>
                </div>
            </div>
        </div>
        <nav class="pagination-bar" th:if="${type == '分类'}">
            <span th:if="${pageInfo.hasPreviousPage}">
                <a class="prev page-numbers" th:href="@{${pageInfo.pageNum-1} == 1 ? '/categories/' + ${name} + '/': '/categories/' + ${name} + '/page/' + ${pageInfo.pageNum-1}+'/'}" ><i class="fa fa-angle-left"></i></a>
            </span>
            <span th:each="pageNum : ${pageInfo.navigatepageNums}">
            <span th:if="${pageNum == pageInfo.pageNum}">
                <a href="javascript:void(0)" th:text="${pageNum}" class="page-numbers current"></a>
            </span>
            <span th:if="${pageNum != pageInfo.pageNum}">
                <a th:href="@{${pageNum} == 1 ? '/categories/' + ${name} + '/': '/categories/' + ${name} + '/page/' + ${pageNum}+'/'}" th:text="${pageNum}" class="page-numbers hidden-xs"></a>
            </span>
            </span>
            <span th:if="${pageInfo.hasNextPage}">
                <a class="next page-numbers" th:href="@{'/categories/' + ${name} + '/page/' +  ${pageInfo.pageNum+1}+'/'}" ><i class="fa fa-angle-right"></i></a>
            </span>
        </nav>
        <nav class="pagination-bar" th:if="${type == '标签'}">
            <span th:if="${pageInfo.hasPreviousPage}">
                <a class="prev page-numbers" th:href="@{${pageInfo.pageNum-1} == 1 ? '/tags/' + ${name} + '/': '/tags/' + ${name} + '/page/' + ${pageInfo.pageNum-1}+'/'}" ><i class="fa fa-angle-left"></i></a>
            </span>
            <span th:each="pageNum : ${pageInfo.navigatepageNums}">
            <span th:if="${pageNum == pageInfo.pageNum}">
                <a href="javascript:void(0)" th:text="${pageNum}" class="page-numbers current"></a>
            </span>
            <span th:if="${pageNum != pageInfo.pageNum}">
                <a th:href="@{${pageNum} == 1 ? '/tags/' + ${name} + '/': '/tags/' + ${name} + '/page/' + ${pageNum}+'/'}" th:text="${pageNum}" class="page-numbers hidden-xs"></a>
            </span>
            </span>
            <span th:if="${pageInfo.hasNextPage}">
                <a class="next page-numbers" th:href="@{'/tags/' + ${name} + '/page/' +  ${pageInfo.pageNum+1}+'/'}" ><i class="fa fa-angle-right"></i></a>
            </span>
        </nav>
    </div>
</div>
</body>
</html>